Socket
Socket
Sign inDemoInstall

@iota/transaction

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iota/transaction

Utilities and validators for transactions.


Version published
Weekly downloads
1.9K
decreased by-3.29%
Maintainers
5
Weekly downloads
 
Created
Source

@iota/transaction

Utilities and validators for transactions.

Installation

Install using npm:

npm install @iota/transaction

or using yarn:

yarn add @iota/transaction

API Reference

transaction~transactionHash(trits)

ParamTypeDescription
tritsInt8ArrayInt8Array of 8019 transaction trits

Calculates the transaction hash out of 8019 transaction trits.

Returns: Hash - Transaction hash

transaction~isTransaction(tx)

ParamType
txobject

Checks if input is valid transaction object.

transaction~isTailTransaction(transaction)

ParamType
transactionobject

Checks if given transaction object is tail transaction. A tail transaction is one with currentIndex=0.

transaction~isTransactionHash(hash, mwm)

ParamType
hashstring
mwmnumber

Checks if input is correct transaction hash (81 trytes)

transaction~isTransactionTrytes(trytes, minWeightMagnitude)

ParamType
trytesstring
minWeightMagnitudenumber

Checks if input is correct transaction trytes (2673 trytes)

transaction~isAttachedTrytes(trytes)

ParamType
trytesstring

Checks if input is valid attached transaction trytes. For attached transactions last 241 trytes are non-zero.

Keywords

FAQs

Package last updated on 11 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc